﻿using System.Reflection;

namespace Borg
{
    internal class ShutdownTask : Task<Repository>
    {
        public override string Name
        {
            get { return string.Format("Shutdown()", new object[0]); }
        }

        public ShutdownTask(uint taskGroupId, Assembly initiator)
            : base(Runtime.Repository, taskGroupId, initiator)
        { }

        public override void Execute()
        {
            Runtime.InternalShutdown(initiator);
        }

        public override string ToString()
        {
            return string.Format("{0}: Runtime.InternalShutdown()", taskGroupId);
        }
    }
}

